package org.stvd.entities.admin;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.validator.constraints.NotEmpty;
import org.stvd.entities.base.BaseEntity;

/**
 * 系统角色-实体类
 * @author houzx
 */
@Entity
@Table(name="roles")
public class Roles extends BaseEntity{
	
    private static final long serialVersionUID = -2379879924962194101L;
    
    /**
     * 角色ID
     */
    @Id
    @Column(name="role_id",nullable=false)
    private String roleId = "";
    
    /**
     * 角色名称
     */
    @Column(name="role_name",nullable=false)
    @NotEmpty(message="角色名称不能为空！")
    private String roleName = "";
    
    /**
     * 角色编码
     */
    @Column(name="role_code",nullable=false)
    @NotEmpty(message="角色编码不能为空！")
    private String roleCode = "";

    /**
     * 角色描述
     */
    @Column(name="memo")
    private String memo = "";
    
    /**
     * 是否启用{T:启用；F:禁用}
     */
    @Column(name="enable",nullable=false)
    private String enable = "";
    
    /**
     * 机构ID
     */
    @Column(name="dep_id",nullable=false)
    private String depId = "";
    
    /*
     * 是否内建角色；内置角色，即默认角色，不需单位权限，也可以使用 {0:非内置角色，1：内置角色}
     */
    @Column(name="build_in",nullable=false)
    private String buildIn = "0";
    
    /**
     * 系统平台GUID
     */
    @Column(name="guid",nullable=false)
    private String guid = "";
    
    /**
     * 是否选中
     */
    @Transient
    private boolean checked = false;

	public String getRoleId() {
		return roleId;
	}

	public void setRoleId(String roleId) {
		this.roleId = roleId;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}

	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public String getEnable() {
		return enable;
	}

	public void setEnable(String enable) {
		this.enable = enable;
	}

	public String getDepId() {
		return depId;
	}

	public void setDepId(String depId) {
		this.depId = depId;
	}

	public String getBuildIn() {
		return buildIn;
	}

	public void setBuildIn(String buildIn) {
		this.buildIn = buildIn;
	}

	public String getGuid() {
		return guid;
	}

	public void setGuid(String guid) {
		this.guid = guid;
	}

	public boolean isChecked() {
		return checked;
	}

	public void setChecked(boolean checked) {
		this.checked = checked;
	}
}
